/*
 * Altitude.cpp
 *
 *  Created on: Jun 12, 2016
 *      Author: Yang
 */

#include "Altitude.hpp"

Altitude_MS5611 MS5611;

void Altitude_Task_Init(void)
{
	hal.Hard_delay_ms(10);
    MS5611.Init();
    console.printf((char*) "MS5611 Initialization                             [OK]\r\n");
}

void Altitude_Task_Loop(void *pvParameters)
{
    portTickType xLastWakeTime;

    xLastWakeTime = xTaskGetTickCount();
    for (;;)
    {
        MS5611.Data_Refresh();
        vTaskDelayUntil(&xLastWakeTime, (10 / portTICK_RATE_MS));  //100Hz
    }
}

